package com.spring.application;

import com.spring.entity.Person;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import javax.sql.DataSource;
import java.sql.SQLException;

public class SpringApplication_7 {

    //spring管理连接池
    @Test
    public void getSpringXmlAutoConfig() throws SQLException {
        ApplicationContext context = new ClassPathXmlApplicationContext("springIOC-conf-7.xml");
        Person person = context.getBean("person", Person.class);
        System.out.println(person);
    }
}
